<template>
  <div>
    <ul class="pagination">
      <li v-for="item in total" @click="switchPage(item)">{{ item }}</li>

    </ul>
  </div>
</template>

<script>
export default {
  name: 'DEMOPagination',

  props: {
    total: Number,
  },

  methods: {
    switchPage(pageValue) {
      console.log(pageValue);
      this.$emit('modifynowpage', pageValue)

    }
  },
};
</script>

<style lang="less" scoped>
.pagination {
  list-style: none;
  padding: 0;
  margin: 0;
  height: 40px;
  background-color: #fff;
  margin: 20px;

  li {
    float: left;
    width: 40px;
    height: 40px;
    background-color: aqua;
    margin: 0 5px;
    text-align: center;
    line-height: 40px;
  }
}
</style>